/*meYk+W0WRvuxDKz9zdRutyUN9UtJuoAveqn0nXxPK6+SXTJ9fL1ZQUjF3ZIO+qug*/
import { proTransferSearch } from '../constants';
import { orgAfterEvent4proTransfer } from './afterEvent';

import fa from 'fa';
import ampub from 'ampub';

const {fa_components} = fa;

const { referLinkageClear } = fa_components.ReferLinkage;

// 参照过滤业务单元
const { components: { assetOrgMultiRefFilter: { isMultiCorpRefHandler, renderCompleteEvent } } } = ampub;


const defaultConfig = {
	//查询区
	searchId: proTransferSearch,
	linkageData: {
		//联动链
		//参照字段:['被过滤字段1'，'被过滤字段2']
		pk_org: [
			'pk_recorder',
			'bodyvos.pk_usedept', //使用部门
			'bodyvos.pk_mandept', //管理部门
			'bodyvos.pk_asset_user' //使用人
		]
	}
};
export default function purAfterEvent(field, val) {
	if (field === 'pk_org') {
		referLinkageClear.call(this, this.props, field, defaultConfig);
	}

     // 主组织编辑后：主组织关联参照字段控制其业务单元是否显示
	if (field === 'pk_org') {
		renderCompleteEvent.call(this, this.props, proTransferSearch, 'pk_org', orgAfterEvent4proTransfer.bind(this));
	}
}

/*meYk+W0WRvuxDKz9zdRutyUN9UtJuoAveqn0nXxPK6+SXTJ9fL1ZQUjF3ZIO+qug*/